package com.youlg.service.Books;

import com.youlg.mapper.Books.BooksMapper;
import com.youlg.pojo.Books;

import java.util.List;

public class BookServiceImpl implements BookService{

    private BooksMapper booksMapper;

    public BooksMapper getBooksMapper() {
        return booksMapper;
    }

    public void setBooksMapper(BooksMapper booksMapper) {
        this.booksMapper = booksMapper;
    }

    public int addBook(Books book) {
        return booksMapper.addBook(book);
    }

    public int deleteBookById(int id) {
        return booksMapper.deleteBookById(id);
    }

    public int updateBook(Books books) {
        return booksMapper.updateBook(books);
    }

    public Books queryBookId(int id) {
        return booksMapper.queryBookId(id);
    }

    public List<Books> queryAllBook() {
        return booksMapper.queryAllBook();
    }

    public List<Books> queryBookName(String bookName) {
        return booksMapper.queryBookName(bookName);
    }

}
